<?php
include("../functions.php");

if($_POST['id']){
    $faculty_id=$_POST['id'];
    $sql = mysql_query("SELECT s.id,s.name FROM faculty f, specializations s
                    WHERE (s.id_faculty = '$faculty_id' AND s.id_faculty=f.id)");
    while($row = mysql_fetch_assoc($sql)){
    $id=$row['id'];
    $name=$row['name'];
    echo '<option value="'.$id.'">'.$name.'</option>';
    }
}
?>
